<!DOCTYPE html>
<html>
<#include "../head.html">
    <body class="full">
    <div class="mc">
        <div class="mc-l">
            <!--左侧导航---{-->
            <div id="navPanelContainer">
                <div class="system-logo cd"></div>
                <!--管理员信息---{-->
                <#include "../adminInfo.html">
                    <!--管理员信息---}-->
                    <div class="nav-wrap">
                        <#include "left.html">
                    </div>
            </div>
            <!--左侧导航---}-->
        </div>
        <div class="mc-m">
            <div class="navToggle"></div>
        </div>
        <div class="mc-r">
            <!--顶部导航---{-->
            <#include "../topNav.html">
                <!--顶部导航---}-->

                <!--面包屑导航---{-->
                <#assign moduleName="短信查询">
                    <#include "banner.html">
                        <!--面包屑导航---}-->

                        <!--工具栏--{-->
                        <div id="toolbar" class="clearfix">
                            <div class="toolbor-module search">
                                <input type="button" class="input-button return" value="返回" onclick="">
                            </div>
                        </div>
                        <!--工具栏--}-->

                        <div id="main" class="clearfix">
                            <div class="valBox w750">
                                <div class="top">
                                    <strong>短信查询</strong>
                                </div>
                                <div class="val clearfix">
                                    <ul>
                                        <li>
                                            <div class="title">messageID：</div>
                                            <div class="v">
                                                <input id="messageID" type="text" name="messageID" onkeyup="value=value.replace(/[^0-9]/g,'')"/>
                                                <input id="reportBtn" type="button" value="查询">
                                            </div>
                                        </li>
                                        <li>
                                            <div class="title">手机号：</div>
                                            <div class="v" id="mobile">
                                            </div>
                                        </li>
                                        <li>
                                            <div class="title">发送状态：</div>
                                            <div class="v" id="deliverStatus">
                                            </div>
                                        </li>
                                        <li>
                                            <div class="title">发送时间：</div>
                                            <div class="v" id="deliveredTime">
                                            </div>
                                        </li>
                                        <li>
                                            <div class="title">发送条数：</div>
                                            <div class="v" id="smsCount">
                                            </div>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
        </div>
    </div>
    <div class="mc-b">
        <#include "../foot.html">
    </div>
    <#include "../jsPage.html">
        <script type="text/javascript">
            $("#reportBtn").click(function() {
                var messageID = $("#messageID").val();
                if(messageID == "") {
                    alert("请输入有效的messageID");
                    return false;
                }
                var data = {"messageID": messageID, "actionType": "report"};
                $.post("/admin/msg/smsReport.html", data, function(data) {
                    if(data.resultCode == 1) {
                        var json = eval("(" + data.resultMsg + ")");
                        $("#mobile").html(json.mobile || "");
                        $("#deliverStatus").html(json.deliverStatus || "");
                        $("#deliveredTime").html(json.deliveredTime || "");
                        $("#smsCount").html(json.smsCount || 0 + "条")
                    } else {
                        $("#mobile").html("");
                        $("#deliverStatus").html("");
                        $("#deliveredTime").html("");
                        $("#smsCount").html("");
                        alert(data.resultMsg);
                    }
                });
            });
        </script>
    </body>
</html>